<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>随手快递</title>
		<link rel="stylesheet" type="text/css" href="../../AUI/css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../font-awesome/css/font-awesome.min.css" />
		<style type="text/css">
		.register {
			text-align: center;
			margin-top: 45px;
		}
		.aui-btn {
			margin: 10px auto;
		}
		.aui-radio:checked {
		background: #EE6E73;
		border: 1px solid #EE6E73;
		}
		.la {
			width: 100%;
			padding: 10px 20px;
			text-align: center;
		}
		input[type="text"], input[type="password"]{
			width:80%;
			height: 30px;
			border-bottom: 1px solid #bfbfbf;
			color: #626262;
			font-size: 15px;
			padding-left:10px ;
			margin: auto;
		}
		</style>
	</head>
	<body style="overflow-x: hidden">
		<header class="aui-bar aui-bar-nav" id="aui-header">
			<a class="aui-btn aui-pull-left" tapmode onclick="history.back();">
				<span class="aui-iconfont aui-icon-left"></span>
			</a>
			<div class="aui-title">注册</div>
			<div class="aui-btn aui-pull-right"></div>
		</header>
			<div class="aui-content" style="margin-top: 80px">
				<div class="la">
					<input type="text" placeholder="请输入手机号" id="phone">
				</div>
				</div>
		<div  style="text-align: center;margin-top: 10px">
			<div class="aui-btn aui-btn-success" style="width: 70%;height: 35px;line-height: 35px;background: rgb(40, 174, 161)" id="register">发送验证码</div>
			<div style="margin: 40px auto;font-size: 14px"><span><input id="radio" class="aui-radio" type="radio" checked></span><span style="margin-left: 10px">我已同意<a>《随手快递用户协议》</a></span></div>
		</div>

		<script type="text/javascript" src="../../myJs/jquery-1.12.1.min.js" ></script>
		<script src="../../myJs/jquery.cookie.js"></script>
		<script type="text/javascript" src="../../myJs/index.js" ></script>
		<script>
			//保存地址
			$("#register").on("click",function(){
				var phone = $("#phone").val();
				if(phone==""){
					alertmd("请输入手机号");
					return false;
				}
				if (!phone.match(/^1[34578]\d{9}$/)) {
					alertmd("手机号码格式不正确");
					$("#phone").val("");
					return false;
				}
					
				 $.ajax({
				 type: "post",
				 url: '/randomdelivery/userLoginController/registerPhone',
				 data: {
					 phone:phone
				 },
				 datatype: "json",
				 success: function (data) {
					 alert(JSON.stringify(data));
					 location.href='phone_r.html';
				 }

				 });
			})
		</script>
	</body>
	</html>